/*jslint browser: true, nomen: true, es5: true*/
/*global $, jQuery, window, requirejs, require, define, Promise*/
(function (factory) {
    "use strict";
	if (typeof define === "function" && define.amd) {
		// AMD. Register as an anonymous module.
		define(["lhmcv.IndexedDB", "lhmcv.AjaxDB"], factory);
	} else {
        // Browser globals
        window.lhmcv = window.lhmcv || {};
        var IndexedDB = window.lhmcv.IndexedDB,
            AjaxDB = window.lhmcv.AjaxDB;
        if (IndexedDB && AjaxDB) {
            window.lhmcv.model = factory(IndexedDB, AjaxDB);
        } else {
            throw new Error("One of dependants of lhmcv.models is missing.");
        }
	}
}(function (IndexedDB, AjaxDB) {
    "use strict";
    var model;
    model = function (indexed_db_name, base_ajax_url) {
        this.indexed_db_name = indexed_db_name;
        this.base_ajax_url = base_ajax_url;
        this.indexed_db_inst = new IndexedDB();
        this.ajax_db_inst = new AjaxDB();
    };
    return model;
}));